import RPi.GPIO as GPIO
from .tm1637 import TM1637
import time

class Display_4:
    def __init__(self,CLK,DIO):
        self.CLK = CLK #
        self.DIO = DIO
        self.tm = TM1637(clk=self.CLK, dio=self.DIO,brightness=7)
        # all LEDS on "88:88"
        self.tm.write([127, 255, 127, 127])
        time.sleep(1)
              
    def worker(self,ul):
        while True:
            time.sleep(0.1)
            # display 
            self.tm.number(int(ul.distance))
         
                  
           